package listener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import panel.AddPanel;
import panel.DeletePanel;
import panel.EditPanel;
import panel.ScorePage;
import panel.ScoreTable;
import panel.ScorequduanPanel;

public class ScoreListener implements ActionListener{

	@Override
	public void actionPerformed(ActionEvent e) {
		JButton p=(JButton) e.getSource();
		if(p==ScoreTable.instance.add)
			AddPanel.instance.setVisible(true);
		if(p==ScoreTable.instance.delete)
			DeletePanel.instance.setVisible(true);
		if(p==ScoreTable.instance.edit)
			EditPanel.instance.setVisible(true);
		if(p==ScoreTable.instance.quduan)
			ScorequduanPanel.instance.setVisible(true);
		if(p==ScorePage.instance.update)
			ScoreTable.instance.setVisible(true);;
	}
}
